package com.serkol.driving.learning.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.serkol.driving.learning.entity.AttributeValue;
import com.serkol.driving.learning.mapper.AttributeValueMapper;
import com.serkol.driving.learning.service.AttributeValueService;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
* @author pingan
* @description 针对表【attribute_value】的数据库操作Service实现
* @createDate 2022-09-16 19:40:17
*/
@Service
public class AttributeValueServiceImpl extends ServiceImpl<AttributeValueMapper, AttributeValue>
    implements AttributeValueService{

    @Cacheable(cacheNames = "findByKeys", key = "#key")
    @Override
    public List<AttributeValue> findByKey(String key) {
        List<AttributeValue> byKey = this.baseMapper.findByKey(key);
        return byKey;
    }
    @Cacheable(cacheNames = "findBySelectValueKey", key = "#attrkey")
    @Override
    public   Map<String, Map<String, Object>> findBySelectValueKey(String attrkey) {
        return this.baseMapper.findBySelectValueKey(attrkey);
    }
    @Cacheable(cacheNames = "findBySelectValueKeyList", key = "#attrkey")
    @Override
    public List<Map<String, Object>> findBySelectValueKeyList(String attrkey) {
        return this.baseMapper.findBySelectValueKeyList(attrkey);
    }
    @Cacheable(cacheNames = "findBySelectIdKey", key = "#attrkey")
    @Override
    public Map<String, Map<String, Object>> findBySelectIdKey(String attrkey) {
        return null;
    }
}




